<html>
<head>
    <title>WebSocket</title>
</head>
<body>
<script>
    var ws = new WebSocket("ws://localhost:8080/webSocket/game/1/1");

    ws.onopen = function (evt) {
        console.log("Connection open ...");
        ws.send("Hello WebSockets!");
    };

    ws.onmessage = function (evt) {
        console.log("Received Message: " + evt.data);
        ws.close();
    };

    ws.onclose = function (evt) {
        console.log("Connection closed.");
    };
</script>
</body>
</html>